<?php use_stylesheet('main.css') ?>
<span class="heading1">My Returns</span>
<table id="data_list">
  <tbody>
    <tr>
      <th>S.No</th>
      <th>Date Of Returns </th>
      <th>Investment</th>
      <th>Returns %</th>
      <th>Returns Amount</th>
      <th>Remarks</th>
    </tr>
    <?php
    $count = 0;
    $total = 0;
    foreach ($data as $item):
    $count++;
    $total += $item->getAmount();
    ?>
    <tr>
      <td><?php echo $count; ?></td>
      <td><?php echo $item->getCreatedAt($dateFormat); ?></td>
      <td><?php echo $currency; ?> <?php echo $xistsUser->getDepositAmount(); ?></td>
      <td><?php echo $xistsUser->getXistsPlan()->getRetPercentage(); ?></td>
      <td><?php echo $currency; ?> <?php echo $item->getAmount(); ?></td>
      <td><?php echo $item->getRemarks(); ?></td>
    </tr>
    <?php
    endforeach;?>
  </tbody>
  <thead>
    <tr>
      <th colspan="3">Total Returns:</th>
      <td colspan="3"><?php echo $currency; ?> <?php echo $total; ?></td>
    </tr>
  </thead>
  <?php if (!count($data)): ?>
  <tfoot>
    <tr>
      <td colspan="6">Oops! No Transactions Found</td>
    </tr>
  </tfoot>
  <?php endif;?>
</table>